import Taro, { Component } from '@tarojs/taro'
import { Image, View } from '@tarojs/components'
import './index.scss'
// import { SHOP_LOADING } from "@/config/file"
import { APP_VERSION } from "@/config/config"
import { getAppConfig } from '@/utils/storage'

interface IProps {
  isCover?: any
}

export default class Loading extends Component<IProps, {}> {
  state: any

  constructor() {
    super(...arguments)
    this.state = {
    }
  }

  // componentWillMount() {
  //   const loading = getAppConfigStorage('APP_LOADING')
  //   if (loading) {
  //     this.setState({ loading })
  //   }
  // }

  render() {
    // @ts-ignore
    return (<View className='loading' catchtouchmove>
      <View className='loading-box'>
        <Image src={getAppConfig('loadingImg')} mode='widthFix' className='image-bg'/>
      </View>
      <View className='version-box'>{APP_VERSION}</View>
    </View>)
  }
}
